1. Technical Field
This disclosure relates generally to type conversion, and more specifically to type conversion using a floating-point unit.
2. Description of the Related Art
Graphics processing often involves type conversion. For example, computations are typically performed using floating-point numbers, but results may be stored using integer formats. Thus, conversion between floating-point numbers and integer formats may be common. As one specific example, the OPENGL® UNORM and SNORM normalized integer formats are used to store representations of floating-point numbers in the ranges 0 to 1.0 and −1.0 to 1.0 respectively. These formats may be converted to floating-point numbers and vice versa using the unpack and pack operations. This type conversion may be performed using dedicated units in graphics execution pipelines. However, dedicated units may increase chip area, e.g., because they may require an extra set of flops for providing source operands.